﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZhimeiSoft.CharmManager.DOL
{
    /// <summary>
    /// 员工调休表
    /// </summary>
    [Serializable()]
    public class DBEntityEmoloyeeVacation : DBEntityBase
    {
        /// <summary>
        /// 表名称
        /// </summary>
        /// <returns></returns>
        public override string GetTableName()
        {
            return "EMPLOYEEVACATION";
        }
        /// <summary>
        /// EmployeeID 属于 员工调休表
        /// </summary>
        public int EMPLOYEEID { get; set; }
        /// <summary>
        /// 记录状态 V0A 有效正在调休 V0T 完成调休
        /// </summary>
        public string VSTATE { get; set; }
        /// <summary>
        /// 调休开始时间
        /// </summary>
        public DateTime VSTARTDATETIME { get; set; }
        /// <summary>
        /// 调休结束时间
        /// </summary>
        public DateTime VENDDATETIME { get; set; }
        /// <summary>
        /// 字段名
        /// </summary>
        public static class FieldName
        {
            /// <summary>
            /// EmployeeID 属于 员工调休表
            /// </summary>
            public const string EMPLOYEEID = "EMPLOYEEID";
            /// <summary>
            /// 记录状态 V0A 有效正在调休 V0T 完成调休
            /// </summary>
            public const string VSTATE = "VSTATE";
            /// <summary>
            /// 调休开始时间
            /// </summary>
            public const string VSTARTDATETIME = "VSTARTDATETIME";
            /// <summary>
            /// 调休结束时间
            /// </summary>
            public const string VENDDATETIME = "VENDDATETIME";
        }
        /// <summary>
        /// 记录状态 V0A 有效 V0T 完成调休 返回枚举
        /// </summary>
        public static class ENUM_STATE
        {
            /// <summary>
            /// V0A 有效正在调休返回枚举
            /// </summary>
            public const string VOA = "VOA";
            /// <summary>
            /// V0T 完成调休返回枚举
            /// </summary>
            public const string VOT = "VOT";
        }
        /// <summary>
        /// 记录状态 V0A 有效 V0T 完成调休 返回中文
        /// </summary>
        public static class ENUM_STATE_CHINESE{
            /// <summary>
            /// V0A 有效正在调休返回中文
            /// </summary>
            public const string VOA = "正在调休";
            /// <summary>
            /// V0T 完成调休返回中文
            /// </summary>
            public const string VOT = "完成调休";
        }
        /// <summary>
        /// 根据汉字获取员工休假状态信息
        /// </summary>
        /// <param name="state">比较的字符串</param>
        /// <returns>返回状态</returns>
        public static string getStateStrToVSTATE(string state)
        {
            if (state.Trim().Equals("正在调休"))
            {
                return ENUM_STATE.VOA;
            }
            else if (state.Trim().Equals("完成调休"))
            {
                return ENUM_STATE.VOT;
            }
            else
            {
                return "";
            }
        }
        /// <summary>
        /// 根据枚举值返回中文意义
        /// </summary>
        /// <param name="state">STATE枚举值</param>
        /// <returns></returns>
        public static string getVSTATEToStateStr(string state)
        {
            if (state.Equals(ENUM_STATE.VOA))
            {
                return "正在调休";
            }
            else if (state.Equals(ENUM_STATE.VOT))
            {
                return "完成调休";
            }
            else
            {
                return "";
            }
        }
    }

}
